<?php defined('NABU') || exit ?>

<h1><?= $head_title ?></h1>

<?php require_once 'views/layouts/messages.php' ?>

<form method="post" action="<?= NABU_ROUTES['login'] ?>">
  <input type="hidden" name="csrf" value="<?= $token ?>">
  <div>
    <label for="identity">Correo institucional o usuario</label>
    <input type="text" id="identity" name="identity" minlength="1" maxlength="255" autofocus required>
  </div>
  <div>
    <label for="password">Contraseña</label>
    <input type="password" id="password" name="password" minlength="6" maxlength="255" required>
  </div>
  <div>
    <input type="submit" name="login_submit" value="<?= "$head_title" ?>">
    <p>¿No tienes cuenta? <a href="<?= NABU_ROUTES['signup'] ?>">Regístrate en <?= NABU_DEFAULT['name'] ?></a>.</p>
  </div>
</form>
